# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("../build/webrtc.gni")

source_set("video_engine") {
  deps = [ ":video_engine_core" ]
}

source_set("video_engine_core") {
  sources = [
    "include/vie_base.h",
    "include/vie_capture.h",
    "include/vie_codec.h",
    "include/vie_errors.h",
    "include/vie_external_codec.h",
    "include/vie_image_process.h",
    "include/vie_network.h",
    "include/vie_render.h",
    "include/vie_rtp_rtcp.h",
    "call_stats.cc",
    "call_stats.h",
    "encoder_state_feedback.cc",
    "encoder_state_feedback.h",
    "overuse_frame_detector.cc",
    "overuse_frame_detector.h",
    "payload_router.cc",
    "payload_router.h",
    "report_block_stats.cc",
    "report_block_stats.h",
    "stream_synchronization.cc",
    "stream_synchronization.h",
    "vie_base_impl.cc",
    "vie_base_impl.h",
    "vie_capture_impl.cc",
    "vie_capture_impl.h",
    "vie_capturer.cc",
    "vie_capturer.h",
    "vie_channel.cc",
    "vie_channel_group.cc",
    "vie_channel_group.h",
    "vie_channel.h",
    "vie_channel_manager.cc",
    "vie_channel_manager.h",
    "vie_codec_impl.cc",
    "vie_codec_impl.h",
    "vie_defines.h",
    "vie_encoder.cc",
    "vie_encoder.h",
    "vie_external_codec_impl.cc",
    "vie_external_codec_impl.h",
    "vie_file_image.cc",
    "vie_file_image.h",
    "vie_frame_provider_base.cc",
    "vie_frame_provider_base.h",
    "vie_image_process_impl.cc",
    "vie_image_process_impl.h",
    "vie_impl.cc",
    "vie_impl.h",
    "vie_input_manager.cc",
    "vie_input_manager.h",
    "vie_manager_base.cc",
    "vie_manager_base.h",
    "vie_network_impl.cc",
    "vie_network_impl.h",
    "vie_receiver.cc",
    "vie_receiver.h",
    "vie_ref_count.cc",
    "vie_ref_count.h",
    "vie_remb.cc",
    "vie_remb.h",
    "vie_renderer.cc",
    "vie_renderer.h",
    "vie_render_impl.cc",
    "vie_render_impl.h",
    "vie_render_manager.cc",
    "vie_render_manager.h",
    "vie_rtp_rtcp_impl.cc",
    "vie_rtp_rtcp_impl.h",
    "vie_sender.cc",
    "vie_sender.h",
    "vie_shared_data.cc",
    "vie_shared_data.h",
    "vie_sync_module.cc",
    "vie_sync_module.h",
  ]

  configs += [ "..:common_config" ]
  public_configs = [ "..:common_inherited_config" ]

  if (is_clang) {
    # Suppress warnings from Chrome's Clang plugins.
    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
    configs -= [ "//build/config/clang:find_bad_constructs" ]
  }

  if (is_win) {
    cflags = [
      # TODO(jschuh): Bug 1348: fix size_t to int truncations.
      "/wd4267",  # size_t to int truncation.
      # Bug 261.
      "/wd4373",  # legacy warning for ignoring const / volatile in signatures.
    ]
  }

  deps = [
    "..:webrtc_common",
    "../common_video",
    "../modules/bitrate_controller",
    "../modules/rtp_rtcp",
    "../modules/utility",
    "../modules/video_capture:video_capture_module",
    "../modules/video_coding",
    "../modules/video_processing",
    "../modules/video_render:video_render_module",
    "../voice_engine",
    "../system_wrappers",
  ]
}
